import Vue from "vue";
import VueRouter from "vue-router";
import CommunityHome from "@/components/CommunityHome.vue";
import WorkspaceDashboard from "@/components/workspace/WorkspaceDashboard.vue";
import PatrolPointDisplay from "@/components/patrolManagement/PatrolPointDisplay.vue";
import communityDisplay from "@/components/communityManagement/communityDisplay.vue";
import BuildingDisplay from "@/components/communityManagement/buildingDisplay.vue";
import PatrolPointAdd from "@/components/patrolManagement/PatrolPointAdd.vue";
import PatrolPointRecordDisplay from "@/components/patrolManagement/PatrolPointRecordDisplay.vue";
import PatrolPointUpdate from "@/components/patrolManagement/PatrolPointUpdate.vue";
import PatrolCategoryDisplay from "@/components/patrolManagement/PatrolCategoryDisplay.vue";
import PatrolCategoryAdd from "@/components/patrolManagement/PatrolCategoryAdd.vue";
import PatrolCategoryEdit from "@/components/patrolManagement/PatrolCategoryEdit.vue";
import PatrolCategoryView from "@/components/patrolManagement/PatrolCategoryView.vue";
import PatrolRouteDisplay from "@/components/patrolManagement/PatrolRouteDisplay.vue";
import PatrolRouteAdd from "@/components/patrolManagement/PatrolRouteAdd.vue";
import PatrolRouteEdit from "@/components/patrolManagement/PatrolRouteEdit.vue";
import PatrolRouteMap from "@/components/patrolManagement/PatrolRouteMap.vue";
import PatrolPlanDisplay from "@/components/patrolManagement/PatrolPlanDisplay.vue";
import PatrolPlanAdd from "@/components/patrolManagement/PatrolPlanAdd.vue";
import PatrolPlanEdit from "@/components/patrolManagement/PatrolPlanEdit.vue";
import PatrolPlanDetail from "@/components/patrolManagement/PatrolPlanDetail.vue";
import PatrolTaskDisplay from "@/components/patrolManagement/PatrolTaskDisplay.vue";
import PatrolTaskAdd from "@/components/patrolManagement/PatrolTaskAdd.vue";
import Register from "@/components/uums/Register.vue";
import Login from "@/components/uums/login.vue";
import UserManagement from "@/components/sys/userManagement.vue";
import sysLog from "@/components/sys/sysLog.vue";
import PropertyNotice from "@/components/property/propertyNotice.vue";
import SenProperty from "@/components/property/senProperty.vue";
import NoticeDetail from "@/components/property/NoticeDetail.vue";

import ParkingRecord from "@/components/PropertyManagement/ParkingRecord.vue";
import ParkingRecordDetail from "@/components/PropertyManagement/ParkingRecordDetail.vue";
import Vehicleidentification from "@/components/PropertyManagement/Vehicleidentification.vue";
import PropertyRepairReport from "@/components/estatemanagement/PropertyRepairReport.vue";
import CloudPtzControl from "@/components/smartiot/CloudPtzControl.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    component: CommunityHome,
    redirect: "/workspace",
    children: [
      {
        path: "workspace",
        component: WorkspaceDashboard,
      },
      {
        path: "patrolPointDisplay",
        component: PatrolPointDisplay,
      },
      {
        path: "communityDisplay",
        component: communityDisplay,
      },
      {
        path: "buildingDisplay",
        component: BuildingDisplay,
      },
      {
        path: "patrolPointAdd",
        component: PatrolPointAdd,
      },
      {
        path: "patrolPointRecordDisplay",
        component: PatrolPointRecordDisplay,
      },
      {
        path: "patrolPointUpdate",
        component: PatrolPointUpdate,
      },
      {
        path: "patrolCategoryDisplay",
        component: PatrolCategoryDisplay,
      },
      {
        path: "patrolCategoryAdd",
        component: PatrolCategoryAdd,
      },
      {
        path: "patrolCategoryEdit",
        component: PatrolCategoryEdit,
      },
      {
        path: "patrolCategoryView",
        component: PatrolCategoryView,
      },
      {
        path: "patrolRouteDisplay",
        component: PatrolRouteDisplay,
      },
      {
        path: "patrolRouteAdd",
        component: PatrolRouteAdd,
      },
      {
        path: "patrolRouteEdit",
        component: PatrolRouteEdit,
      },
      {
        path: "patrolRouteMap",
        component: PatrolRouteMap,
      },
      {
        path: "patrolPlanDisplay",
        component: PatrolPlanDisplay,
      },
      {
        path: "patrolPlanAdd",
        component: PatrolPlanAdd,
      },
      {
        path: "patrolPlanEdit",
        component: PatrolPlanEdit,
      },
      {
        path: "patrolPlanDetail",
        component: PatrolPlanDetail,
      },
      {
        path: "patrolTaskDisplay",
        component: PatrolTaskDisplay,
      },
      {
        path: "patrolTaskAdd",
        component: PatrolTaskAdd,
      },
      {
        path: "/sys/userManagement",
        name: "userManagement",
        component: UserManagement,
      },
      {
        path: "/register",
        name: "register",
        component: Register,
      },
      {
        path: "/sys/sysLog",
        name: "sysLog",
        component: sysLog,
      },
      {
        path: "/property/propertyNotice",
        name: "propertyNotice",
        component: PropertyNotice,
      },
      {
        path: "/property/senProperty",
        name: "senProperty",
        component: SenProperty,
      },
      {
        path: "/property/noticeDetail/:noticeId",
        name: "noticeDetail",
        component: NoticeDetail,
        props: true,
      },
      {
        path: "parking-record",
        name: "parking-record",
        component: ParkingRecord,
      },
      {
        path: "parking-record-detail",
        name: "ParkingRecordDetail",
        component: ParkingRecordDetail,
      },
      {
        path: "vehicle-identification",
        name: "vehicle-identification",
        component: Vehicleidentification,
      },
      { path: "propertyRepairReport", component: PropertyRepairReport },
      { path: "cloudPtzControl", component: CloudPtzControl },
    ],
  },

  {
    path: "/login",
    name: "login",
    component: Login,
  },
];

const router = new VueRouter({
  routes,
});

export default router;
